{if $full_page}
<!-- $Id: order_list.htm 8201 2007-04-17 03:07:34Z weberliu $ -->
{include file="pageheader.htm"}
{insert_scripts files="../js/utils.js,listtable.js"}
<!-- 订单搜索 -->
<div class="form-div">
  <form action="javascript:searchOrder()" name="searchForm">
    <img src="images/icon_search.gif" width="26" height="22" border="0" alt="SEARCH" />
    {$lang.order_sn}<input name="order_sn" type="text" id="order_sn" size="15">
    {$lang.consignee}<input name="consignee" type="text" id="consignee" size="15">
    {$lang.all_status}
    <select name="status" id="status">
      <option value="-1">{$lang.select_please}</option>
      {html_options options=$status_list}
    </select>
    <input type="submit" value="{$lang.button_search}" class="button" />
    <a href="order.php?act=list&composite_status={$os_unconfirmed}">{$lang.cs.$os_unconfirmed}</a>
    <a href="order.php?act=list&composite_status={$cs_await_pay}">{$lang.cs.$cs_await_pay}</a>
    <a href="order.php?act=list&composite_status={$cs_await_ship}">{$lang.cs.$cs_await_ship}</a>
  </form>
</div>

<!-- 订单列表 -->
<form method="post" action="order.php?act=shen" name="listForm" onsubmit="return check()">
  <div class="list-div" id="listDiv">
{/if}
<table cellpadding="3" cellspacing="1">
  <tr>
    <th>参见团购订单人数：{$group_number}</th>
     <th>

  <tr>
</table>

<table cellpadding="3" cellspacing="1">
  <tr>
    <th>
      订单号</th>
    <th>{$lang.order_time}{$sort_order_time}</th>
    <th>姓名</th>
    <th>数量</th>
    <th>邮件</th>
    <th>留言</th>
    <th>{$lang.all_status}</th>
    <th>{$lang.handler}</th>
  <tr>
  {foreach from=$group_buy_list item=order}
  <tr>
    <td valign="top" nowrap="nowrap"><input type="checkbox" name="checkboxes[]" id="checkboxes" value=" {$order.id }" />      {$order.group_buy_id }</td>
    <td>{$order.customer_tell}</td>
    <td align="left" valign="top"><a href="mailto:{$order.email}"></a>{$order.customer_name }</td>
    <td align="right" valign="top" nowrap="nowrap">{$order.buy_number}</td>
    <td align="right" valign="top" nowrap="nowrap">{$order.customer_mail}</td>
    <td align="center" valign="top" nowrap="nowrap">{$order.customer_text}</td>
    <td align="center" valign="top" nowrap="nowrap">
	{if $order.verify==0}
	未审核
	{else}
	已审核
	{/if}	</td>
    <td align="center" valign="top"  nowrap="nowrap"><a href="../group_buy.php?act=shen&amp;id={$order.id}">审核</a></td>
  </tr>
  {/foreach}
</table>

<!-- 分页 -->
<table id="page-table" cellspacing="0">
  <tr>
    <td>
      <input name="Submit" type="submit" id="btnSubmit" value="删除" class="button" disabled="true" /></td>
    <td align="right" nowrap="true">
    {include file="page.htm"}
    </td>
  </tr>
</table>

{if $full_page}
  </div>
</form>
<script language="JavaScript">
listTable.recordCount = {$record_count};
listTable.pageCount = {$page_count};

{foreach from=$filter item=item key=key}
listTable.filter.{$key} = '{$item}';
{/foreach}
{literal}

    onload = function()
    {
        // 开始检查订单
        startCheckOrder();
    }

    /**
     * 搜索订单
     */
    function searchOrder()
    {
        listTable.filter['order_sn'] = Utils.trim(document.forms['searchForm'].elements['order_sn'].value);
        listTable.filter['consignee'] = Utils.trim(document.forms['searchForm'].elements['consignee'].value);
        listTable.filter['composite_status'] = document.forms['searchForm'].elements['status'].value;
        listTable.filter['page'] = 1;
        listTable.loadList();
    }

    function check()
    {
      var snArray = new Array();
      var eles = document.forms['listForm'].elements;
      for (var i=0; i<eles.length; i++)
      {
        if (eles[i].tagName == 'INPUT' && eles[i].type == 'checkbox' && eles[i].checked && eles[i].value != 'on')
        {
          snArray.push(eles[i].value);
        }
      }
      if (snArray.length == 0)
      {
        return false;
      }
      else
      {
        eles['order_id'].value = snArray.toString();
        return true;
      }
    }
</script>
{/literal}

{include file="pagefooter.htm"}
{/if}